<template>
	<view class="page">
		<!-- search -->
		<view class=""
			style="display: flex;flex-direction: row;align-items: center;padding: 12px;background-color: #FFFFFF;justify-content: space-between;">
			<view class="" @click="popBack()">
				<text class="iconfont icon-arrow-left" style="font-size: 16px;font-weight: bold;"></text>
				<text style="font-size: 16px;">{{schoolTitle}}</text>
			</view>
			<view style="margin-left: 12px;display: flex;align-items: center;flex-direction: row;background-color: #007AFF30;
				border-radius: 15px;border-color: #007AFF;padding: 10px;border-style: solid;border-width: 1px;">
				<text style="text-align: center;font-size: 12px;display: block;color: #007AFF;">Internally
					qualifed({{schFollowUpProgress||0}})</text>
			</view>
		</view>
		<!-- list -->
		<view class="" style="flex: 1;overflow-y: auto;">
			<!-- 基本信息 -->
			<view style="padding: 12px;background-color: #FFFFFF">
				<form-title :title="baseInfo.title"></form-title>
				<form-key-value-row :keystr="key" :valuestr="baseInfo.data[key]"
					v-for="(key,idx) in Object.keys(baseInfo.data)" :key="idx"></form-key-value-row>
			</view>
			<!-- 详情信息 -->
			<view style="padding: 12px;background-color: #FFFFFF">
				<form-title :title="detailInfo.title"></form-title>
				<form-key-value-row :keystr="key" :valuestr="detailInfo.data[key]"
					v-for="(key,idx) in Object.keys(detailInfo.data)" :key="idx"></form-key-value-row>
				<form-key-des></form-key-des>
			</view>
			<!-- 日期信息 -->
			<!--<view style="padding: 12px;background-color: #FFFFFF">
				<form-title :title="dateInfo.title" :show_line="1"></form-title>
				<form-key-value-row :keystr="key" :valuestr="dateInfo.data[key]"
					v-for="(key,idx) in Object.keys(dateInfo.data)" :key="idx"></form-key-value-row>
			</view>-->
			<!-- 学分信息 -->
			<view style="padding: 12px;background-color: #FFFFFF">
				<form-title :title="leanPointInfo.title" :show_line="1"></form-title>
				<form-key-des :keystr="key" :valuestr="leanPointInfo.data[key]"
					v-for="(key,idx) in Object.keys(leanPointInfo.data)" :key="idx"></form-key-des>
			</view>
			<!-- 寄件人信息 -->
			<view style="padding: 12px;background-color: #FFFFFF;">
				<form-title :title="memberInfo.title" :show_line="1"></form-title>
				<div v-for="(obj,i) in memberInfo.data" style="border-bottom: 1px solid #ebebeb;padding: 5px 0;">
					<form-key-value-row keystr="收件人" :valuestr="obj['contactsName']" />
					<form-key-value-row keystr="联系电话" :valuestr="obj['contactsPhone']" />
					<form-key-value-row keystr="地址" :valuestr="obj['contactsOfficeAddress']" />
				</div>
			</view>
			<!-- 邮箱信息 -->
			<view style="padding: 12px;background-color: #FFFFFF">
				<form-title :title="emailInfo.title" :show_line="1"></form-title>
				<form-key-value-row :keystr="key" :valuestr="emailInfo.data[key]"
					v-for="(key,idx) in Object.keys(emailInfo.data)" :key="idx"></form-key-value-row>
			</view>
			<!-- 附件信息 -->
			<view style="padding: 12px;background-color: #FFFFFF">
				<form-title :title="fileInfo.title" :show_line="1"></form-title>
				<form-key-file-row :keystr="key" :valuestr="fileInfo.data[key]['fileName']"
					v-for="(key,idx) in Object.keys(fileInfo.data)" :key="idx"></form-key-file-row>
			</view>
		</view>





	</view>
</template>

<script>
	import {
		schoolRead
	} from "../../api/workbench.js"
	export default {

		data() {
			return {
				schoolTitle:"",
				schoolId: "",
				mainProgess:"",
				"baseInfo": {
					"style": "00",
					"title": "基本资料",
					"data": {
						"学校编号": "1654687",
						"跟进进度": "1111",
						"负责人": "222",
						"创建人": "333",
						"创建时间": "444",
					}
				},
				"detailInfo": {
					"title": "详细资料",
					"data": {
						"中文名": "四川大学",
						"性质": "公立大学",
						"性质": "公立大学",
						"性质": "公立大学",
						"性质": "公立大学",
						"性质": "公立大学",
						"性质": "公立大学",
						"性质": "公立大学",
						"竞争对手描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
						"竞争对手描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
						"竞争对手描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
						"竞争对手描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
						"竞争对手描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
					}
				},
				"leanPointInfo": {
					"title": "转学分信息",
					"data": {
						"转学分信息描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
						"转学分信息描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
						"转学分信息描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
						"转学分信息描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
						"转学分信息描述": "竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述竞争对手描述",
					}
				},
				"memberInfo": {
					"title": "寄送人信息",
					"data": {
						"收件人": "zhangsan",
						"联系电话": "15648979894",
						"邮编": "12346",
						"地址": "四川省成都市北京街4654658",
					}
				},
				"emailInfo": {
					"title": "邮箱",
					"data": {
						"邮箱后缀": "@163.com;@qq.com",
					}
				},
				"fileInfo": {
					"title": "附件",
					"data": {
						"英语登记": "xxxx.png",
						"合同": "xxxxx.png",
						"其他附件": "xxxx.png",
						"课程大纲页眉": "xxxx.png",
						"课程大纲页脚": "xxxx.png",
					}
				}
			}
		},
		computed: {
			list() {
				let arr = []
				arr = Object.values(this.detailModel)
				return arr;
			}
		},
		onLoad(option) {
			this.schoolId = option.id;
		},
		mounted() {
			this.netSchoolRead()
		},
		methods: {
			netSchoolRead() {
				let self = this;
				let fi = {
					id: this.schoolId
				};
				schoolRead(fi).then(res => {
					let {
						data
					} = res;
					self.schoolTitle = data.schoolCnName;
					self.baseInfo.data = {
						"学校编号": data.id,
						"跟进进度": data.schFollowUpProgress || 0,
						"负责人": data.schResponsiblePersonName,
						"创建人": data.createBy,
						"创建时间": data.createTime,
					}
					self.detailInfo.data = {
						"中文名": data.schoolCnName,
						"英文名": data.schoolEnName,
						"大学缩写": data.schUniversityAbbreviation,
						"性质": data.schNature,
						"类别": data.schCategory,
						"官方地址": "暂无",
						"学制": data.schSchoolSystem,
						"所属国家": data.schCountry,
						"省/州": data.schProvince,
						"城市": data.schCity,
						"街道": data.schStreet,
						"邮编": data.schMailbox,
						"学生人数": data.schStuNumber,
						"国际学生人数": data.schInternationalStuNumber,
						"排名": data.schRanking,
						"意向项目": data.schIntendedProject,
						"是否有网课": data.schOnlineYesno,
						"学费": data.schTuition,
						"开始合作时间": data.schStartCooperationTime,
						"成立时间": data.schEstablishmentTime,
						"是否与竞争对手合作": data.schCompetitorYesno,
						"竞争对手描述": "暂无",
						"学费情况": data.schTuitionFees,
						"国内合作高校": data.schDomesticCooperativeUniversities,
						"开设专业": data.schOpenMajor,
						"结算条件": data.schExpenseSettlementConditions,
						"市场情况": data.schMarketDetails,
						"course catalog": data.schCourseCatalog,
						"database link": data.schDatabaseLink
					}
					self.leanPointInfo.data = {
						"转学分政策": data.schCreditTransferPolicy,
						"转学分要求": data.schCreditTransferRequirements,
						"成绩要求": data.schPerformanceRequirements,
						"GPA要求": data.schGpaRequirements,
						"学分限制": data.schCreditLimit,
						"备注说明": data.schRemarks,
					}
					// [{
					// 	"收件人": "暂无",
					// 	"联系电话": "暂无",
					// 	"邮编": "暂无",
					// 	"地址": "暂无",
					// }]
					self.memberInfo.data = data.contactsList


					self.emailInfo.data = {
						"邮箱后缀": data.schMailboxSuffix
					};
					// self.dateInfo.data = {
					// 	"学期": "暂无",
					// 	"开课时间": "暂无",
					// 	"考试时间": "暂无",
					// 	"放假时间": "暂无",
					// }

					// [{type:xx,fileName:"",url:xxx}]
					self.FileInfo.data = data.Files;
					self.mainProgess = data.schFollowUpProgress||0
				}).catch(e => {})
			},
			popBack() {
				uni.navigateBack({

				})
			}
		}
	}
</script>

<style scoped>
	.page {
		flex: 1;
		display: flex;
		flex-direction: column;
		background-color: #0077AA;
	}
</style>
